<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .box{
      margin : 300px auto;
      width:500px;
      height:400px;
      perspective:800px;
      
    }
    .box img{
      width:100%;
      height:100%;
      transition : all 1s;
    }
    .box:hover img{
      transform: rotateX(360deg)
    }
  </style>
</head>
<body>
  <div class="box">
    <img src="./images/x.jpg" alt="">
  </div>
</body>
</html>